package com.robcity.platform.repo;

import com.robcity.platform.convert.RobotLocationInfoConvert;
import com.robcity.platform.dto.RobotLocationInfoSaveDTO;
import com.robcity.platform.entities.RobotLocationInfo;
import com.robcity.platform.mapper.RobotLocationInfoMapper;
import com.robcity.platform.vo.RobotLocationInfoVO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
public class RobotLocationInfoRepo {
    @Resource
    RobotLocationInfoMapper robotLocationInfoMapper;
    public void insert(RobotLocationInfoSaveDTO robotLocationInfoDTO) {
        RobotLocationInfo robotLocationInfo=RobotLocationInfoConvert.SaveDTO2RobotLocationInfo(robotLocationInfoDTO);
        robotLocationInfoMapper.insert(robotLocationInfo);
    }

    public List<RobotLocationInfoVO> getRobotLocationInfo() {
        return robotLocationInfoMapper.getRobotLocationInfo();
    }
}
